package com.mjlf.mjatis.excutor;

import com.mjlf.mjatis.config.Configuration;
import com.mjlf.mjatis.mapper.MapperMethod;
import com.mjlf.mjatis.sql.SqlBound;

import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;

/**
 * @ClassName Executor
 * @Author mjlft
 * @Date 2020/5/22 16:45
 * @Version 1.0
 * @Description 执行器
 */
public interface Executor {

    /**
     * 执行数据更新操作
     * @param configuration
     * @param mapperMethod
     */
    int update(Configuration configuration, MapperMethod mapperMethod) throws SQLException;

    <T>T query(Configuration configuration, MapperMethod mapperMethod, Class<T> tClass) throws SQLException, InstantiationException, IllegalAccessException, InvocationTargetException;
}
